/**
 * @AbstractCommonBean.java  COPYRIGHT xiaojian
 * 
 * Created on 2016年7月18日 下午2:38:22
 */
package xj.toolkit.bean;

import xj.toolkit.util.DefaultPropertiesSupport;
import xj.toolkit.util.Identifier;
import xj.toolkit.util.MutableIdentifyable;

/**
 * @author <a href="mailto:cxj2000@gmail.com">xiaojian.cao</a>
 *
 */
public class AbstractCommonBean extends DefaultPropertiesSupport implements MutableIdentifyable {

	private Identifier id = null;

	public void setIdentification(Identifier id) {
		this.id = id;
	}

	public Identifier<?> getIdentification() {
		return this.id;
	}

	/**
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		AbstractCommonBean other = (AbstractCommonBean) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

}
